// ------------------------------------------------------------
// Copyright (c) Microsoft Corporation.  All rights reserved.
// Licensed under the MIT License (MIT). See License.txt in the repo root for license information.
// ------------------------------------------------------------

#pragma once

#include "stdafx.h"
#include "JsonSerializableTestBase.h"

namespace NativeAndManagedSerializationInteropTest
{
    using namespace std;
    using namespace Common;
    using namespace ServiceModel;

    /// Json properties of this class should match json properties of managed class defined in file:
    /// %SDXROOT%\services\winfab\prod\test\System.Fabric\unit\Common\Serialization\QuerySerializationInterop.Test.cs
    class QuerySerializationInteropTest : public JsonSerializableTestBase
    {
    public:

        BEGIN_JSON_SERIALIZABLE_PROPERTIES()
            // Application Type
            SERIALIZABLE_PROPERTY(L"FABRIC_APPLICATION_TYPE_QUERY_RESULT_ITEM_", FABRIC_APPLICATION_TYPE_QUERY_RESULT_ITEM_)
            SERIALIZABLE_PROPERTY(L"FABRIC_APPLICATION_TYPE_QUERY_RESULT_ITEM_LIST_", FABRIC_APPLICATION_TYPE_QUERY_RESULT_ITEM_LIST_)
            SERIALIZABLE_PROPERTY(L"FABRIC_APPLICATION_TYPE_QUERY_RESULT_ITEM_PAGED_LIST_", FABRIC_APPLICATION_TYPE_QUERY_RESULT_ITEM_PAGED_LIST_)

            // Application
            SERIALIZABLE_PROPERTY(L"FABRIC_APPLICATION_QUERY_RESULT_ITEM_", FABRIC_APPLICATION_QUERY_RESULT_ITEM_)
            SERIALIZABLE_PROPERTY(L"FABRIC_APPLICATION_QUERY_RESULT_ITEM_LIST_", FABRIC_APPLICATION_QUERY_RESULT_ITEM_LIST_)

            // Service Type
            SERIALIZABLE_PROPERTY(L"FABRIC_SERVICE_TYPE_DESCRIPTION_", FABRIC_SERVICE_TYPE_DESCRIPTION_)
            SERIALIZABLE_PROPERTY(L"FABRIC_SERVICE_TYPE_QUERY_RESULT_ITEM_", FABRIC_SERVICE_TYPE_QUERY_RESULT_ITEM_)
            SERIALIZABLE_PROPERTY(L"FABRIC_SERVICE_TYPE_QUERY_RESULT_LIST_", FABRIC_SERVICE_TYPE_QUERY_RESULT_LIST_)

            // Replica, Partition
            SERIALIZABLE_PROPERTY(L"FABRIC_SERVICE_REPLICA_QUERY_RESULT_ITEM_", FABRIC_SERVICE_REPLICA_QUERY_RESULT_ITEM_)
            SERIALIZABLE_PROPERTY(L"FABRIC_SERVICE_PARTITION_INFORMATION_", FABRIC_SERVICE_PARTITION_INFORMATION_)
            SERIALIZABLE_PROPERTY(L"FABRIC_SERVICE_PARTITION_LIST_RESULT_", FABRIC_SERVICE_PARTITION_LIST_RESULT_)
            SERIALIZABLE_PROPERTY(L"FABRIC_SERVICE_PARTITION_QUERY_RESULT_ITEM_", FABRIC_SERVICE_PARTITION_QUERY_RESULT_ITEM_)
            SERIALIZABLE_PROPERTY(L"FABRIC_SERVICE_REPLICA_LIST_RESULT_", FABRIC_SERVICE_REPLICA_LIST_RESULT_)

            // Service
            SERIALIZABLE_PROPERTY(L"FABRIC_SERVICE_QUERY_RESULT_ITEM_", FABRIC_SERVICE_QUERY_RESULT_ITEM_)

            SERIALIZABLE_PROPERTY(L"FABRIC_SERVICE_QUERY_RESULT_LIST_", FABRIC_SERVICE_QUERY_RESULT_LIST_)

            // Node
            SERIALIZABLE_PROPERTY(L"FABRIC_NODE_DEACTIVATION_QUERY_RESULT_ITEM_", FABRIC_NODE_DEACTIVATION_QUERY_RESULT_ITEM_)
            SERIALIZABLE_PROPERTY(L"FABRIC_NODE_DEACTIVATION_TASK_", FABRIC_NODE_DEACTIVATION_TASK_)
            SERIALIZABLE_PROPERTY(L"FABRIC_NODE_QUERY_RESULT_ITEM_", FABRIC_NODE_QUERY_RESULT_ITEM_)
            SERIALIZABLE_PROPERTY(L"FABRIC_NODE_LIST_QUERY_RESULT_", FABRIC_NODE_LIST_QUERY_RESULT_)

            // Deployed Application
            SERIALIZABLE_PROPERTY(L"FABRIC_DEPLOYED_APPLICATION_QUERY_RESULT_ITEM_", FABRIC_DEPLOYED_APPLICATION_QUERY_RESULT_ITEM_)
            SERIALIZABLE_PROPERTY(L"FABRIC_DEPLOYED_APPLICATION_QUERY_RESULT_ITEM_LIST_", FABRIC_DEPLOYED_APPLICATION_QUERY_RESULT_ITEM_LIST_)
            SERIALIZABLE_PROPERTY(L"FABRIC_DEPLOYED_APPLICATION_QUERY_RESULT_ITEM_PAGED_LIST_", FABRIC_DEPLOYED_APPLICATION_QUERY_RESULT_ITEM_PAGED_LIST_)

            // Deployed Replica
            SERIALIZABLE_PROPERTY(L"FABRIC_DEPLOYED_SERVICE_REPLICA_QUERY_RESULT_ITEM_", FABRIC_DEPLOYED_SERVICE_REPLICA_QUERY_RESULT_ITEM_)
            SERIALIZABLE_PROPERTY(L"FABRIC_DEPLOYED_SERVICE_REPLICA_QUERY_RESULT_ITEM2_", FABRIC_DEPLOYED_SERVICE_REPLICA_QUERY_RESULT_ITEM2_)
            SERIALIZABLE_PROPERTY(L"FABRIC_DEPLOYED_SERVICE_REPLICA_QUERY_RESULT_ITEM3_", FABRIC_DEPLOYED_SERVICE_REPLICA_QUERY_RESULT_ITEM3_)
            SERIALIZABLE_PROPERTY(L"FABRIC_DEPLOYED_SERVICE_REPLICA_DETAIL_QUERY_RESULT_ITEM_", FABRIC_DEPLOYED_SERVICE_REPLICA_DETAIL_QUERY_RESULT_ITEM_)
            SERIALIZABLE_PROPERTY(L"FABRIC_DEPLOYED_SERVICE_REPLICA_DETAIL_QUERY_RESULT_ITEM2_", FABRIC_DEPLOYED_SERVICE_REPLICA_DETAIL_QUERY_RESULT_ITEM2_)

            // Code package
            SERIALIZABLE_PROPERTY(L"FABRIC_CODE_PACKAGE_ENTRY_POINT_", FABRIC_CODE_PACKAGE_ENTRY_POINT_)
            SERIALIZABLE_PROPERTY(L"FABRIC_CODE_PACKAGE_ENTRY_POINT_STATISTICS_", FABRIC_CODE_PACKAGE_ENTRY_POINT_STATISTICS_)
            SERIALIZABLE_PROPERTY(L"FABRIC_DEPLOYED_CODE_PACKAGE_QUERY_RESULT_ITEM_LIST_", FABRIC_DEPLOYED_CODE_PACKAGE_QUERY_RESULT_ITEM_LIST_)
            SERIALIZABLE_PROPERTY(L"FABRIC_DEPLOYED_CODE_PACKAGE_QUERY_RESULT_ITEM_", FABRIC_DEPLOYED_CODE_PACKAGE_QUERY_RESULT_ITEM_)
            SERIALIZABLE_PROPERTY(L"FABRIC_DEPLOYED_SERVICE_PACKAGE_QUERY_RESULT_ITEM_", FABRIC_DEPLOYED_SERVICE_PACKAGE_QUERY_RESULT_ITEM_)

            // Replicator
            SERIALIZABLE_PROPERTY(L"FABRIC_PRIMARY_REPLICATOR_STATUS_QUERY_RESULT_", FABRIC_PRIMARY_REPLICATOR_STATUS_QUERY_RESULT_)
            SERIALIZABLE_PROPERTY(L"FABRIC_SECONDARY_REPLICATOR_STATUS_QUERY_RESULT_", FABRIC_SECONDARY_REPLICATOR_STATUS_QUERY_RESULT_)

            // Load
            SERIALIZABLE_PROPERTY(L"FABRIC_LOAD_METRIC_INFORMATION_", FABRIC_LOAD_METRIC_INFORMATION_)
            SERIALIZABLE_PROPERTY(L"FABRIC_LOAD_METRIC_REPORT_", FABRIC_LOAD_METRIC_REPORT_)
            SERIALIZABLE_PROPERTY(L"FABRIC_REPLICA_LOAD_INFORMATION_", FABRIC_REPLICA_LOAD_INFORMATION_)
            SERIALIZABLE_PROPERTY(L"FABRIC_PARTITION_LOAD_INFORMATION_", FABRIC_PARTITION_LOAD_INFORMATION_)
            SERIALIZABLE_PROPERTY(L"FABRIC_NODE_LOAD_INFORMATION_", FABRIC_NODE_LOAD_INFORMATION_)
            SERIALIZABLE_PROPERTY(L"FABRIC_NODE_LOAD_METRIC_INFORMATION_", FABRIC_NODE_LOAD_METRIC_INFORMATION_)

            // Service Group
            SERIALIZABLE_PROPERTY(L"FABRIC_SERVICE_GROUP_TYPE_MEMBER_DESCRIPTION_", FABRIC_SERVICE_GROUP_TYPE_MEMBER_DESCRIPTION_)
            SERIALIZABLE_PROPERTY(L"FABRIC_SERVICE_GROUP_MEMBER_TYPE_QUERY_RESULT_ITEM_", FABRIC_SERVICE_GROUP_MEMBER_TYPE_QUERY_RESULT_ITEM_)
        END_JSON_SERIALIZABLE_PROPERTIES()

        // ApplicationType
        ApplicationTypeQueryResult FABRIC_APPLICATION_TYPE_QUERY_RESULT_ITEM_;
        vector<ApplicationTypeQueryResult> FABRIC_APPLICATION_TYPE_QUERY_RESULT_ITEM_LIST_;
        ApplicationTypePagedList FABRIC_APPLICATION_TYPE_QUERY_RESULT_ITEM_PAGED_LIST_;

        // Application
        ApplicationQueryResult FABRIC_APPLICATION_QUERY_RESULT_ITEM_;
        ApplicationList FABRIC_APPLICATION_QUERY_RESULT_ITEM_LIST_;

        // DeployedApplication
        DeployedApplicationQueryResult FABRIC_DEPLOYED_APPLICATION_QUERY_RESULT_ITEM_;
        vector<DeployedApplicationQueryResult> FABRIC_DEPLOYED_APPLICATION_QUERY_RESULT_ITEM_LIST_;
        DeployedApplicationPagedList FABRIC_DEPLOYED_APPLICATION_QUERY_RESULT_ITEM_PAGED_LIST_;

        // DeployedCodePackage
        DeployedCodePackageQueryResult FABRIC_DEPLOYED_CODE_PACKAGE_QUERY_RESULT_ITEM_;
        vector<DeployedCodePackageQueryResult> FABRIC_DEPLOYED_CODE_PACKAGE_QUERY_RESULT_ITEM_LIST_;

        // CodePackage
        CodePackageEntryPointStatistics FABRIC_CODE_PACKAGE_ENTRY_POINT_STATISTICS_;
        CodePackageEntryPoint FABRIC_CODE_PACKAGE_ENTRY_POINT_;

        // ServicePackage
        DeployedServiceManifestQueryResult FABRIC_DEPLOYED_SERVICE_PACKAGE_QUERY_RESULT_ITEM_;

        // DeployedReplica
        DeployedServiceReplicaQueryResult FABRIC_DEPLOYED_SERVICE_REPLICA_QUERY_RESULT_ITEM_;
        DeployedServiceReplicaQueryResult FABRIC_DEPLOYED_SERVICE_REPLICA_QUERY_RESULT_ITEM2_;
        DeployedServiceReplicaQueryResult FABRIC_DEPLOYED_SERVICE_REPLICA_QUERY_RESULT_ITEM3_;

        // DeployedReplicaDetail
        DeployedServiceReplicaDetailQueryResult FABRIC_DEPLOYED_SERVICE_REPLICA_DETAIL_QUERY_RESULT_ITEM_;
        DeployedServiceReplicaDetailQueryResult FABRIC_DEPLOYED_SERVICE_REPLICA_DETAIL_QUERY_RESULT_ITEM2_;
        ReplicatorStatusQueryResult FABRIC_REPLICATOR_STATUS_QUERY_RESULT_;
        SecondaryReplicatorStatusQueryResult FABRIC_SECONDARY_REPLICATOR_STATUS_QUERY_RESULT_;
        PrimaryReplicatorStatusQueryResult FABRIC_PRIMARY_REPLICATOR_STATUS_QUERY_RESULT_;

        // Load
        LoadMetricInformation FABRIC_LOAD_METRIC_INFORMATION_;
        LoadMetricReport FABRIC_LOAD_METRIC_REPORT_;

        // NodeDeactivation
        NodeDeactivationQueryResult FABRIC_NODE_DEACTIVATION_QUERY_RESULT_ITEM_;
        NodeDeactivationTask FABRIC_NODE_DEACTIVATION_TASK_;

        // Node
        NodeQueryResult FABRIC_NODE_QUERY_RESULT_ITEM_;
        NodeList FABRIC_NODE_LIST_QUERY_RESULT_;

        // Replica
        ServiceReplicaQueryResult FABRIC_SERVICE_REPLICA_QUERY_RESULT_ITEM_;
        ReplicaList FABRIC_SERVICE_REPLICA_LIST_RESULT_;

        // Partition
        ServicePartitionInformation FABRIC_SERVICE_PARTITION_INFORMATION_;
        ServicePartitionQueryResult FABRIC_SERVICE_PARTITION_QUERY_RESULT_ITEM_;
        PartitionList FABRIC_SERVICE_PARTITION_LIST_RESULT_;

        // Service
        ServiceQueryResult FABRIC_SERVICE_QUERY_RESULT_ITEM_;
        ServiceList FABRIC_SERVICE_QUERY_RESULT_LIST_;

        // ServiceType
        ServiceTypeDescription FABRIC_SERVICE_TYPE_DESCRIPTION_;
        ServiceTypeQueryResult FABRIC_SERVICE_TYPE_QUERY_RESULT_ITEM_;
        vector<ServiceTypeQueryResult> FABRIC_SERVICE_TYPE_QUERY_RESULT_LIST_;

        // Service Group
        ServiceGroupTypeMemberDescription FABRIC_SERVICE_GROUP_TYPE_MEMBER_DESCRIPTION_;
        ServiceGroupMemberTypeQueryResult FABRIC_SERVICE_GROUP_MEMBER_TYPE_QUERY_RESULT_ITEM_;

        // Code/Config Version
        ProvisionedFabricCodeVersionQueryResultItem FABRIC_PROVISIONED_CODE_VERSION_QUERY_RESULT_ITEM_;
        ProvisionedFabricConfigVersionQueryResultItem FABRIC_PROVISIONED_CONFIG_VERSION_QUERY_RESULT_ITEM_;

        NodeLoadMetricInformation FABRIC_NODE_LOAD_METRIC_INFORMATION_;
        NodeLoadInformationQueryResult FABRIC_NODE_LOAD_INFORMATION_;
        PartitionLoadInformationQueryResult FABRIC_PARTITION_LOAD_INFORMATION_;
        ReplicaLoadInformationQueryResult FABRIC_REPLICA_LOAD_INFORMATION_;
    };
}
